/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "geospatialelement")
@NamedQueries({
    @NamedQuery(name = "Geospatialelement.findAll", query = "SELECT g FROM Geospatialelement g"),
    @NamedQuery(name = "Geospatialelement.findByIdgeospatialelement", query = "SELECT g FROM Geospatialelement g WHERE g.idgeospatialelement = :idgeospatialelement"),
    @NamedQuery(name = "Geospatialelement.findByDecimallongitude", query = "SELECT g FROM Geospatialelement g WHERE g.decimallongitude = :decimallongitude"),
    @NamedQuery(name = "Geospatialelement.findByDecimallatitude", query = "SELECT g FROM Geospatialelement g WHERE g.decimallatitude = :decimallatitude"),
    @NamedQuery(name = "Geospatialelement.findByCoordinateuncertaintyinmeters", query = "SELECT g FROM Geospatialelement g WHERE g.coordinateuncertaintyinmeters = :coordinateuncertaintyinmeters"),
    @NamedQuery(name = "Geospatialelement.findByGeoreferenceremark", query = "SELECT g FROM Geospatialelement g WHERE g.georeferenceremark = :georeferenceremark"),
    @NamedQuery(name = "Geospatialelement.findByGeodeticdatum", query = "SELECT g FROM Geospatialelement g WHERE g.geodeticdatum = :geodeticdatum"),
    @NamedQuery(name = "Geospatialelement.findByPointradiusspatialfit", query = "SELECT g FROM Geospatialelement g WHERE g.pointradiusspatialfit = :pointradiusspatialfit"),
    @NamedQuery(name = "Geospatialelement.findByVerbatimcoordinate", query = "SELECT g FROM Geospatialelement g WHERE g.verbatimcoordinate = :verbatimcoordinate"),
    @NamedQuery(name = "Geospatialelement.findByVerbatimlatitude", query = "SELECT g FROM Geospatialelement g WHERE g.verbatimlatitude = :verbatimlatitude"),
    @NamedQuery(name = "Geospatialelement.findByVerbatimlongitude", query = "SELECT g FROM Geospatialelement g WHERE g.verbatimlongitude = :verbatimlongitude"),
    @NamedQuery(name = "Geospatialelement.findByVerbatimcoordinatesystem", query = "SELECT g FROM Geospatialelement g WHERE g.verbatimcoordinatesystem = :verbatimcoordinatesystem"),
    @NamedQuery(name = "Geospatialelement.findByGeoreferenceprotocol", query = "SELECT g FROM Geospatialelement g WHERE g.georeferenceprotocol = :georeferenceprotocol"),
    @NamedQuery(name = "Geospatialelement.findByFootprintwkt", query = "SELECT g FROM Geospatialelement g WHERE g.footprintwkt = :footprintwkt"),
    @NamedQuery(name = "Geospatialelement.findByFootprintspatialfit", query = "SELECT g FROM Geospatialelement g WHERE g.footprintspatialfit = :footprintspatialfit")})
public class Geospatialelement implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idgeospatialelement")
    private Integer idgeospatialelement;
    @Column(name = "decimallongitude")
    private Double decimallongitude;
    @Column(name = "decimallatitude")
    private Double decimallatitude;
    @Column(name = "coordinateuncertaintyinmeters")
    private Double coordinateuncertaintyinmeters;
    @Column(name = "georeferenceremark")
    private String georeferenceremark;
    @Column(name = "geodeticdatum")
    private String geodeticdatum;
    @Column(name = "pointradiusspatialfit")
    private String pointradiusspatialfit;
    @Column(name = "verbatimcoordinate")
    private String verbatimcoordinate;
    @Column(name = "verbatimlatitude")
    private String verbatimlatitude;
    @Column(name = "verbatimlongitude")
    private String verbatimlongitude;
    @Column(name = "verbatimcoordinatesystem")
    private String verbatimcoordinatesystem;
    @Column(name = "georeferenceprotocol")
    private String georeferenceprotocol;
    @Column(name = "footprintwkt")
    private String footprintwkt;
    @Column(name = "footprintspatialfit")
    private String footprintspatialfit;
    @ManyToMany(mappedBy = "geospatialelementList", fetch = FetchType.LAZY)
    private List<Georeferencesource> georeferencesourceList;
    @OneToMany(mappedBy = "geospatialelement", fetch = FetchType.LAZY)
    private List<Specimen> specimenList;
    @JoinColumn(name = "idgeoreferenceverificationstatus", referencedColumnName = "idgeoreferenceverificationstatus")
    @ManyToOne(fetch = FetchType.LAZY)
    private Georeferenceverificationstatus georeferenceverificationstatus;

    public Geospatialelement() {
    }

    public Geospatialelement(Integer idgeospatialelement) {
        this.idgeospatialelement = idgeospatialelement;
    }

    public Integer getIdgeospatialelement() {
        return idgeospatialelement;
    }

    public void setIdgeospatialelement(Integer idgeospatialelement) {
        this.idgeospatialelement = idgeospatialelement;
    }

    public Double getDecimallongitude() {
        return decimallongitude;
    }

    public void setDecimallongitude(Double decimallongitude) {
        this.decimallongitude = decimallongitude;
    }

    public Double getDecimallatitude() {
        return decimallatitude;
    }

    public void setDecimallatitude(Double decimallatitude) {
        this.decimallatitude = decimallatitude;
    }

    public Double getCoordinateuncertaintyinmeters() {
        return coordinateuncertaintyinmeters;
    }

    public void setCoordinateuncertaintyinmeters(Double coordinateuncertaintyinmeters) {
        this.coordinateuncertaintyinmeters = coordinateuncertaintyinmeters;
    }

    public String getGeoreferenceremark() {
        return georeferenceremark;
    }

    public void setGeoreferenceremark(String georeferenceremark) {
        this.georeferenceremark = georeferenceremark;
    }

    public String getGeodeticdatum() {
        return geodeticdatum;
    }

    public void setGeodeticdatum(String geodeticdatum) {
        this.geodeticdatum = geodeticdatum;
    }

    public String getPointradiusspatialfit() {
        return pointradiusspatialfit;
    }

    public void setPointradiusspatialfit(String pointradiusspatialfit) {
        this.pointradiusspatialfit = pointradiusspatialfit;
    }

    public String getVerbatimcoordinate() {
        return verbatimcoordinate;
    }

    public void setVerbatimcoordinate(String verbatimcoordinate) {
        this.verbatimcoordinate = verbatimcoordinate;
    }

    public String getVerbatimlatitude() {
        return verbatimlatitude;
    }

    public void setVerbatimlatitude(String verbatimlatitude) {
        this.verbatimlatitude = verbatimlatitude;
    }

    public String getVerbatimlongitude() {
        return verbatimlongitude;
    }

    public void setVerbatimlongitude(String verbatimlongitude) {
        this.verbatimlongitude = verbatimlongitude;
    }

    public String getVerbatimcoordinatesystem() {
        return verbatimcoordinatesystem;
    }

    public void setVerbatimcoordinatesystem(String verbatimcoordinatesystem) {
        this.verbatimcoordinatesystem = verbatimcoordinatesystem;
    }

    public String getGeoreferenceprotocol() {
        return georeferenceprotocol;
    }

    public void setGeoreferenceprotocol(String georeferenceprotocol) {
        this.georeferenceprotocol = georeferenceprotocol;
    }

    public String getFootprintwkt() {
        return footprintwkt;
    }

    public void setFootprintwkt(String footprintwkt) {
        this.footprintwkt = footprintwkt;
    }

    public String getFootprintspatialfit() {
        return footprintspatialfit;
    }

    public void setFootprintspatialfit(String footprintspatialfit) {
        this.footprintspatialfit = footprintspatialfit;
    }

    public List<Georeferencesource> getGeoreferencesourceList() {
        return georeferencesourceList;
    }

    public void setGeoreferencesourceList(List<Georeferencesource> georeferencesourceList) {
        this.georeferencesourceList = georeferencesourceList;
    }

    public List<Specimen> getSpecimenList() {
        return specimenList;
    }

    public void setSpecimenList(List<Specimen> specimenList) {
        this.specimenList = specimenList;
    }

    public Georeferenceverificationstatus getGeoreferenceverificationstatus() {
        return georeferenceverificationstatus;
    }

    public void setGeoreferenceverificationstatus(Georeferenceverificationstatus georeferenceverificationstatus) {
        this.georeferenceverificationstatus = georeferenceverificationstatus;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idgeospatialelement != null ? idgeospatialelement.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Geospatialelement)) {
            return false;
        }
        Geospatialelement other = (Geospatialelement) object;
        if ((this.idgeospatialelement == null && other.idgeospatialelement != null) || (this.idgeospatialelement != null && !this.idgeospatialelement.equals(other.idgeospatialelement))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Geospatialelement[idgeospatialelement=" + idgeospatialelement + "]";
    }

}
